package com.ebao.po.talk;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.ebao.constants.UserType;

/**
 * 说说推送到此表，用户来取
 * 
 * @author snow
 * @Date 2012-9-6
 */
@SuppressWarnings("serial")
@Entity
@Table(name = "T_Talk_Push")
public class TTalkPush implements Serializable {
	
	private Long id;
	private TTalk talk;
	private UserType receiveType;	// 接收者类型
	private String receiverId;		// 接收者Id
	private String pushDate;		// 推送时间, 7天以上的数据系统自动清除
	private Integer status;			// 状态,0未读,1已读

	@Id
	@GeneratedValue
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@ManyToOne(cascade = {}, optional = false, targetEntity = TTalk.class)
	@JoinColumn(name = "talk_id")
	public TTalk getTalk() {
		return talk;
	}

	public void setTalk(TTalk talk) {
		this.talk = talk;
	}

	public UserType getReceiveType() {
		return receiveType;
	}

	public void setReceiveType(UserType receiveType) {
		this.receiveType = receiveType;
	}

	public String getReceiverId() {
		return receiverId;
	}

	public void setReceiverId(String receiverId) {
		this.receiverId = receiverId;
	}

	@Column(length = 19)
	public String getPushDate() {
		return pushDate;
	}

	public void setPushDate(String pushDate) {
		this.pushDate = pushDate;
	}

	@Column(length = 19)
	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

}
